<?php

return array(
    'appMeta' => array(
        'appName' => 'ServiceEngine',
        'appClass' => 'BServiceEngine',
        'description' => 'Service Engine',
        //'showAble' => FALSE,
        'visible' => array('scope' => BService::NOTEXISTSERVICE,
            'scopeType' => BServiceApp::SERVICESCOPETYPE, 'applyRule' => BServiceApp::EXCLUDEAPPLYRULE)
    ),
    'appRoles' => array(
        'admin' => array(
            'service_admin' => array(
                'name' => 'service_admin',
                'type' => BAuthManager::MIXEDTYPEOFROLE,
                'workteam_admin' => array(
                    'name' => 'workteam_admin',
                    'type' => BAuthManager::WORKTEAMADMINROLE,
                ),
                'servedteam_admin' => array(
                    'name' => 'servedteam_admin',
                    'type' => BAuthManager::SERVEDTEAMADMINROLE,
                ),
            ),
        ),
        'member' => array(
            'service_member' => array(
                'name' => 'service_member',
                'type' => BAuthManager::MIXEDTYPEOFROLE,
                'workteam_member' => array(
                    'name' => 'workteam_member',
                    'type' => BAuthManager::WORKTEAMMEMBERROLE,
                ),
                'servedteam_member' => array(
                    'name' => 'servedteam_member',
                    'type' => BAuthManager::SERVEDTEAMMEMBERROLE,
                ),
            ),
        ),
    ),
    'appOperations' => array(
        //operation contain request sender and request receiver
        'sendMessage' => array(
            'name' => 'sendMessage',
            'displayName' => 'Messages',
            'permit' => array(
                //allowAccess define who can access this operation, that means it will show in operation UI
                //allow accessor can be sender or receiver
                'allowAccess' => array(BBasicRolesTemplate::LOGIN_MEMBER_ROLE),
            //by default, senderPermit is login member, also ignore to set in this case
            //'senderPermit' => array(BBasicRolesTemplate::LOGIN_MEMBER_ROLE)
            ),
            'operationContract' => array('class' => 'BOCServiceMessage', 'myRole' => 'sender,receiver'),
            'startScreen' => 'BScreenPersonalMessage'),
        'joinService' => array(
            'name' => 'joinService',
            'displayName' => 'Manage-Member',
            //'data' => array('defaultAssignRole' => BBasicRolesTemplate::SERVEDTEAM_MEMBER_ROLE),
            'permit' => array(
                'allowAccess' => array(BBasicRolesTemplate::SERVICE_ADMIN_ROLE),
                'senderPermit' => array(BBasicRolesTemplate::LOGIN_MEMBER_ROLE =>
                    array(BBasicRolesTemplate::SERVEDTEAM_MEMBER_ROLE, BBasicRolesTemplate::WORKTEAM_MEMBER_ROLE)),
                'autoProcessSenderPermit' => array(BBasicRolesTemplate::LOGIN_MEMBER_ROLE =>
                    array(BBasicRolesTemplate::SERVEDTEAM_MEMBER_ROLE)),
            ),
            'startScreen' => 'BScreenRequestJoinService',
            'operationContract' => array('class' => 'BOCJoinService', 'myRole' => 'receiver')),
        'addServiceApp' => array(
            'name' => 'addServiceApp',
            'displayName' => 'App Store',
            'permit' => array(
                'allowAccess' => array(BBasicRolesTemplate::SERVICE_ADMIN_ROLE),
            ),
            'startScreen' => 'BScreenAppStore',
        ),
    ),
);
?>
